package com.lgc.provider01.service.impl;

import com.lgc.provider01.service.StudentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.stream.IntStream;

/**
 * @param
 * @author lvguangchun
 * @create 2022-08-24 9:35
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Override
    //方法抛出异常，就会回滚，数据库里面的数据也会回滚
    @Transactional(rollbackFor = Exception.class)
    public String getInfo(){
        return "Hello Feign!";
    }
}
